package com.xinzhi.service.impl;

import com.xinzhi.dao.Recruiting_planMapper;
import com.xinzhi.model.Recruiting_plan;
import com.xinzhi.service.IRecruiting_planService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class Recruiting_planImpl implements IRecruiting_planService {

    @Autowired
    private Recruiting_planMapper recruiting_planDao;

    @Override
    public int addplan(Recruiting_plan recruiting_plan) {
        System.out.println("添加信息1");
        return recruiting_planDao.addplan(recruiting_plan);
    }

    @Override
    public int deleteplan(Recruiting_plan recruiting_plan) {
        System.out.println("删除了" + recruiting_plan.getDutyName() + "信息");
        return recruiting_planDao.deleteplan(recruiting_plan);
    }

    @Override
    public int updateplan(Recruiting_plan recruiting_plan) {
        System.out.println("修改了企业为:" + recruiting_plan.getDutyName() + "的信息");
        return recruiting_planDao.updateplan(recruiting_plan);
    }

    @Override
    public List<Recruiting_plan> findAll(Recruiting_plan recruiting_plan, int page) {
        System.out.println("查看第" + recruiting_plan.getPage() + "页信息");
        return recruiting_planDao.allplan(page);
    }

    @Override
    public List<Recruiting_plan> findAll(Recruiting_plan recruiting_plan) {
        System.out.println("查看所有信息");
        return recruiting_planDao.allplan(recruiting_plan);
    }

    @Override
    public List<Recruiting_plan> fuzzyplan(Recruiting_plan recruiting_plan) {
        System.out.println("查询到关于" + recruiting_plan.getPage() + "的信息");
        return recruiting_planDao.fuzzyplan(recruiting_plan);
    }
}